
from django.urls import path
from .views import *

urlpatterns = [
    # 图片验证码
    path('image_code/<str:uuid>/', UserView.as_view({'get':'image_code'})),
    # 用户注册
    path('register/', UserView.as_view({'post':'register'})),
    # 用户登录
    path('login/',UserView.as_view({'post':'login'})),

    # 用户管理
    path('users/',UserView.as_view({'get':'user_desc'})),
    path('user/<int:pk>/', UserView.as_view({'get':'user_info','put':'upd_user','delete':'del_user'})),

    # 学校管理
    path('schools/', SchoolView.as_view({'get':'school_desc','post':'add_school'})),
    path('school/<int:pk>/', SchoolView.as_view({'get':'school_info','put':'upd_school','delete':'del_school'})),

    # 班级管理
    path('clbums/', ClbumView.as_view({'get':'clbum_desc','post':'add_clbum'})),
    path('clbum/<int:pk>/', ClbumView.as_view({'get':'clbum_info','put':'upd_clbum','delete':'del_clbum'})),

    # 问候语
    path('greetings/', GreetingsView.as_view({'get':'greetings_desc'})),
    # 节日问候语
    path('fesgreetings/', GreetingsView.as_view({'get':'fes_greeting_desc'})),

    # 发送接收消息
    path('messages/', MessageView.as_view({'get':'message_desc','post':'add_message'})),

    # 添加搜索记录
    path('searchs/', SearchView.as_view({'post':'add_search'})),

    # 菜单管理
    path('menus/', MenuView.as_view({'get':'menu_desc','post':'add_menu'})),
    path('menu/<int:pk>/', MenuView.as_view({'put':'upd_menu','delete':'del_menu'})),


]